package string;

public class CharAtDemo {
    public static void main(String[] args) {
        String str="www.tedu.cn";
        char c=str.charAt(4);
        System.out.println(c);
        for (int i=0;i<str.length();i++){
            System.out.print(str.charAt(i));
        }
        String line="上海自来水来自海上";
        boolean check=true;
        for (int i=0;i<line.length()/2;i++){
            if (line.charAt(i)!=line.charAt(line.length()-i-1)){
                System.out.print("不");
                check=false;
                break;
            }
        }
        if (check=true){
            System.out.println("是回文");
        }
    }
}
